var say = say||{};
say.account = say.account||{};
say.account.register = say.account.register||{};

/**
 * 注册方法
 */
say.account.register.submit = function(){
	var url = "/security/account/rest/save";
	var formData = base.serializeObject($("#accountForm"));
	$.ajax({
       	type: 'post',
       	url: url,	
       	data: JSON.stringify(formData),
       	dataType:'json',	
       	contentType: 'application/json',
       	success: function (result) {	
	   		if(result){
				if(result.status==1){
					layer.msg(result.msg || "提交成功",{icon:1});
				}
			}
       	},
       	error: function(result){
       		layer.msg(result.msg || "未知错误",{icon:1});
       	}
   	});
};

$(function(){
	base.setTitle("用户注册");
	//绑定方法
	$("#submit").on("click",say.account.register.submit);
});